package com.hs.biye.service;

import com.hs.biye.model.DTO.DepartmentRequest;
import com.hs.biye.model.VO.DepartmentVo;
import com.hs.biye.model.entity.Department;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hs.biye.model.reslut.ResultPage;

import java.util.List;

/**
* @author haoshuai
* @description 针对表【department(科室表)】的数据库操作Service
* @createDate 2023-12-12 18:26:37
*/
public interface DepartmentService extends IService<Department> {


    /**
     * 根据id获取部门信息
     * @param id
     * @return
     */
    DepartmentVo getOneDepartment(Integer id);


    /**
     * 分页查询
     * @param page
     * @param size
     * @return
     */
    ResultPage<DepartmentVo> getDepartment(Integer page, Integer size);

    /**
     * 添加科室
     * @param
     * @return
     */
   boolean addDepartment(DepartmentRequest departmentRequest);

    /**
     *修改科室
     * @param
     * @return
     */
   boolean updateDepartment( DepartmentRequest departmentRequest);

    /**
     * 删除科室
     * @param id
     * @return
     */
   boolean removeDepartment(Integer id);


    /**
     * 获取部门名称
     * @return
     */
   List<DepartmentVo> getDepartmentNameAndId();
    List<DepartmentVo> getDepartmentNameAndId(String name);
}
